package com.ws.entity;

/**
 * @author 王硕
 * @version jdk21
 * @className BasePlusSalesEmployee
 * @description
 * @date 2024/11/7 21:56
 */
public class BasePlusSalesEmployee extends SalesEmployee {
    private double baseSalary;

    public BasePlusSalesEmployee(String name, int birthdayMonth, double monthlySales, double commissionRate, double baseSalary) {
        super(name, birthdayMonth, monthlySales, commissionRate);
        this.baseSalary = baseSalary;
    }

    @Override
    public double getSalary(int month) {
        double baseSalary = super.getSalary(month) + this.baseSalary;
        return baseSalary;
    }

    public double getBaseSalary() {
        return baseSalary;
    }
}
